package com.it.park.common;

import javax.servlet.http.HttpSession;

import com.it.park.rms.client.model.User;

public class SessionUtil {
	public static final String GLOB_SESSION = "user";
	private SessionUtil(){
		
	}
	public static User getSessionUser(HttpSession session){
		return (User) session.getAttribute(GLOB_SESSION);
	}
	
	public static Integer getUserID(HttpSession session){
		User user = (User) session.getAttribute(GLOB_SESSION);
		return user.getId();
	}
	
}
